package com.aooci.ordercat.vo;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.property.SimpleStringProperty;

@SuppressWarnings("restriction")
public class ItemVo {
	private int id;
	private int categoryId;
	private final IntegerProperty sortGroup;
	private final StringProperty label; 
	private final StringProperty name; 
	private final StringProperty price;
	
	
	public ItemVo() {
		this(0, 0, 0, null, null, 0);
	}
	public ItemVo(int id, int categoryId, int sortGroup, String label, String name, float price) {
		super();
		this.id = id;
		this.categoryId = categoryId;
		this.sortGroup = new SimpleIntegerProperty(sortGroup);
		this.label = new SimpleStringProperty(label);
		this.name = new SimpleStringProperty(name);
		this.price = new SimpleStringProperty(Float.toString(price));
	}
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the label
	 */
	public String getLabel() {
		return label.get();
	}
	/**
	 * @param label the label to set
	 */
	public void setLabel(String label) {
		this.label.set(label);
	}
	
	public StringProperty labelProperty() {
		return label;
	}
	/**
	 * @return the label
	 */
	public String getName() {
		return name.get();
	}
	/**
	 * @param label the label to set
	 */
	public void setName(String name) {
		this.name.set(name);
	}
	
	public StringProperty nameProperty() {
		return name;
	}
	/**
	 * @return the price
	 */
	public float getPrice() {
		return Float.valueOf(price.get());
	}
	/**
	 * @param price the price to set
	 */
	public void setPrice(float price) {
		this.price.set(Float.toString(price));
	}
	public StringProperty priceProperty(){
		return price;
	}
	public int getCategoryId() {
		return categoryId;
	}
	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}
	public IntegerProperty sortGroupProperty() {
		return sortGroup;
	}
	
	public int getSortGroup(){
		return this.sortGroup.get();
	}
	
	public void setSortGroup(int sortGroup){
		this.sortGroup.set(sortGroup);
	}
	
}
